package org.huntaway.kindergarten.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the personinfo table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="personinfo"
 */

public abstract class BaseStudent extends org.huntaway.kindergarten.po.Personinfo  implements Serializable {

	public static String REF = "Student";
	public static String PROP_TEACHER = "Teacher";
	public static String PROP_ID = "Id";
	public static String PROP_GENEARCH = "Genearch";
	public static String PROP_CLASS_INFO = "ClassInfo";


	// constructors
	public BaseStudent () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseStudent (java.lang.Integer id) {
		super(id);
	}

	/**
	 * Constructor for required fields
	 */
	public BaseStudent (
		java.lang.Integer id,
		java.lang.Integer isuse) {

		super (
			id,
			isuse);
	}



	private int hashCode = Integer.MIN_VALUE;


	// many to one
	private org.huntaway.kindergarten.po.ClassInfo classInfo;
	private org.huntaway.kindergarten.po.Teacher teacher;
	private org.huntaway.kindergarten.po.Genearch genearch;






	/**
	 * Return the value associated with the column: classinfo
	 */
	public org.huntaway.kindergarten.po.ClassInfo getClassInfo () {
		return classInfo;
	}

	/**
	 * Set the value related to the column: classinfo
	 * @param classInfo the classinfo value
	 */
	public void setClassInfo (org.huntaway.kindergarten.po.ClassInfo classInfo) {
		this.classInfo = classInfo;
	}



	/**
	 * Return the value associated with the column: teacher
	 */
	public org.huntaway.kindergarten.po.Teacher getTeacher () {
		return teacher;
	}

	/**
	 * Set the value related to the column: teacher
	 * @param teacher the teacher value
	 */
	public void setTeacher (org.huntaway.kindergarten.po.Teacher teacher) {
		this.teacher = teacher;
	}



	/**
	 * Return the value associated with the column: genearch
	 */
	public org.huntaway.kindergarten.po.Genearch getGenearch () {
		return genearch;
	}

	/**
	 * Set the value related to the column: genearch
	 * @param genearch the genearch value
	 */
	public void setGenearch (org.huntaway.kindergarten.po.Genearch genearch) {
		this.genearch = genearch;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.huntaway.kindergarten.po.Student)) return false;
		else {
			org.huntaway.kindergarten.po.Student student = (org.huntaway.kindergarten.po.Student) obj;
			if (null == this.getId() || null == student.getId()) return false;
			else return (this.getId().equals(student.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}